 import { PureComponent } from "react"
const App = class Root extends PureComponent
{
    constructor()
    {
        super()
        this.state = {
            name: "cq",
            age: 18,
            height:1.90
        }
    }

    changeState()
    {
        this.setState(
            {
               name:"hh" 
            }
        )
        this.setState((state, props) => {
            console.log(this.state.name, this.props);
        })
    }

    render()
    {
        return (
            <div>
                <div onClick={() => this.changeState()}>
                    <h1>   {this.state.name}</h1>
                    <h2> {this.state.age}</h2>
                    <h3> {this.state.height}</h3>
                </div>
            </div>
        )
    }
}

export default App